<?php
/*name:单位控制器
 *time:2017/6/13
 * XIAHAOWEN
 * */
namespace app\hongyanche\controller;
class Collect{
    public function add()
    {
        $data['mall_id'] = input('mall_id');
//        $data['url'] = input('url');
//        $data['title'] = input('title');
        $data['class'] = input('class');
        $data['forum_id'] = input('forum_id');
        $res = model('collect')->add($data);
        return json($res);
    }

    public function remove()
    {
        $collect_id = input('collect_id');
        $res = model('collect')->remove($collect_id);
        return json($res);
    }

    public function collect_list()
    {
        $filter['page'] = input('page');
        $class = input('class');
        $res = model('collect')->getlist($filter,$class);
        return json($res);
    }

}